package me.yingjie.common

import androidx.compose.foundation.layout.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import me.yingjie.common.components.LeftSide
import me.yingjie.common.components.TrackingBoard
import java.time.LocalDateTime

@Composable
fun App() {
    val startTimeList=ArrayList<LocalDateTime>()
    val finishTimeList = remember { mutableStateListOf<LocalDateTime>() }
    val noteList = remember { mutableStateListOf<String>() }
    val isFinishedList = remember { mutableStateListOf<Boolean>() }
    Row() {
        Column(
            modifier = Modifier.fillMaxWidth().weight(1f).fillMaxHeight(),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center
        ) { LeftSide() }
        Column(
            modifier = Modifier.fillMaxWidth().weight(5f).fillMaxHeight(),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalArrangement = Arrangement.Center,
        ) { TrackingBoard(startTimeList, finishTimeList,noteList,isFinishedList) }
    }
}